package com.bo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})//自定义数据源一定要排除SpringBoot自动配置数据源
public class SpringBootStartApplication extends SpringBootServletInitializer{

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		// 注意这里要指向原先用main方法执行的Application启动类
		return builder.sources(SpringBootStartApplication.class);
	}
	public static void main( String[] args ){
		SpringApplication.run(SpringBootStartApplication.class, args);
	}
}
